import request from '@/utils/request'

/**
 * 车间管理分页查询
 * @param {查询条件} data
 */
export function pageFacWorkshop(query) {
  return request({
    url: 'FacManage/FacWorkshop/pageList',
    method: 'get',
    params: query,
  })
}

/**
 * 车间管理树查询
 */
export function treeFacWorkshop(query) {
  return request({
    url: 'FacManage/FacWorkshop/treeList',
    method: 'get',
    params: query,
  })
}

/**
 * 新增车间管理
 * @param data
 */
export function addFacWorkshop(data) {
  return request({
    url: 'FacManage/FacWorkshop',
    method: 'post',
    data: data,
  })
}
/**
 * 修改车间管理
 * @param data
 */
export function updateFacWorkshop(data) {
  return request({
    url: 'FacManage/FacWorkshop',
    method: 'PUT',
    data: data,
  })
}
/**
 * 获取车间管理详情
 * @param {Id}
 */
export function getFacWorkshop(id) {
  return request({
    url: 'FacManage/FacWorkshop/' + id,
    method: 'get'
  })
}

/**
 * 删除车间管理
 * @param {主键} 
 */
export function delFacWorkshop(pid) {
  return request({
    url: 'FacManage/FacWorkshop/delete',
    method: 'POST',
    data: pid
  })
}
